/*--------------------------------------------------------------------------------
 * Adaptive Intelligence - Foundation Framework Class Library
 * Version 2.00
 * 
 * Equality Comparer Interface
 *		Defines methods to support the comparison of objects for equality.
 *------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------
 * System Imports
 *------------------------------------------------------------------------------*/
using System;
using System.Runtime.InteropServices;

namespace Adaptive.Foundation
{
	/// <summary>
	/// Defines methods to support the comparison of objects for equality.
	/// </summary>
	/// <remarks>
	/// This interface allows the implementation of customized equality 
	/// comparison for collections. That is, you can create your own 
	/// definition of equality, and specify that this definition be used 
	/// with a collection type that accepts the <b>IEqualityComparer</b> 
	/// interface.
	/// </remarks>
	[ComVisible(true)]
	public interface IEqualityComparer
	{
		/// <summary>
		/// Determines whether the specified objects are equal.
		/// </summary>
		/// <remarks>
		/// Implement this method to provide a customized equality comparison for objects.
		/// </remarks>
		/// <param name="x">
		/// Left-side object to be compared.
		/// </param>
		/// <param name="y">
		/// Right-side object to be compared.
		/// </param>
		/// <returns>
		/// <b>true</b> if the two items are to be determined to be equal;
		/// otherwise, <b>false</b>.
		/// </returns>
		bool Equals(object x, object y);
		/// <summary>
		/// 
		/// </summary>
		/// <param name="obj"></param>
		/// <returns></returns>
		int GetHashCode(object obj);
	}
}